# 文件上次测试
from fdfs_client.client import Fdfs_client

client = Fdfs_client('/home/ubuntu/Desktop/meiduo_shopping/meiduo_sp/utility/fastdfs/client.conf')
with open('/home/ubuntu/Desktop/images/1.jpg', 'rb') as f:
	data = f.read()

res = client.upload_by_buffer(data)
# 判断是否上传成功
if res['Status'] != 'Upload successed.':
	print(False)
# 获取上传后的路径
image_url = res['Remote file_id']
